package com.yequan.redis;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

/**
 * @author yq
 * @date 2020/09/21
 */
public class RedisUtil {
    public static JedisPool pool;
    private static Jedis jedis;

    static {
        pool = new JedisPool("192.168.1.204", 6386);
        jedis = pool.getResource();
    }


    public static String getString(String key) {
        return jedis.get(key);
    }

    public static void setString(String key, String value) {
        jedis.set(key, value);
    }

    public static void main(String[] args) {
        String string = getString("[rc19](b)BaseCoronavirusCarpoolLimit:1_1");
        System.out.println(string);
    }

}
